#ifndef _MY_EFFECT_H_
#define _MY_EFFECT_H_
#include "myobject.h"
#include <string>
using namespace std;

namespace fireplane{
	class Effect : public Object{
	public:
		enum EffectType{
			ET_bomb0 = 0,
			ET_bomb1,
			ET_bomb2,

			ET_npc1,
                        ET_npc2,
			ET_npc3,
			ET_npc4,
			ET_npc41,
		};

		struct CreateCmd{
			EffectType _id;
		};

		struct CreateBomb0OrBomb1 : CreateCmd{
			CCPoint worldPos;
		};

		struct CreateBomb2 : CreateCmd{
			CCPoint worldPos;
			string path;
			int animationCount;
			CCRect rect;
		};

		struct CreateNpc1Bomb : CreateCmd{
			CCPoint worldPos;
		};
		struct CreateNpc2Bomb : CreateCmd{
			CCPoint worldPos;
		};
		struct CreateNpc3Bomb : CreateCmd{
			CCPoint worldPos;
		};
		struct CreateNpc4Bomb0 : CreateCmd{
			CCPoint worldPos;
		};



		Effect(EffectType type);
		~Effect();

		virtual void init(CreateCmd* pos);
		static Effect* createEffect(CreateCmd* cmd);

		static void setAllEffectParent(CCNode* parent){
			_all_effect_parent = parent;
		}
		static CCNode* getAllEffectParent(){
			return _all_effect_parent;
		}

	public:
		
	protected:
		EffectType _type;
		static CCNode* _all_effect_parent;
	};
}

#endif